package cn.lrl.api.clients;

import cn.lrl.api.generation.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@Service
//@FeignClient(value = "auth", fallbackFactory = UserClientServiceFallbackFactory.class)
@FeignClient(name = "auth")
public interface UserClient {
    @GetMapping("/user/get/{id}")
    User queryById(@PathVariable("id") Long id);

    @GetMapping("/user/list")
    List<User> queryAll();

    @PostMapping("/user/add")
    Boolean addDept(User user);
}
